home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.4 KB | 34 lines | [TEXT/GEOL] |
- Item 1143014 4-Feb-88 11:32
-
- From: BIANCHI1 Bianchi, Curt
-
- To: SHEETS1 Sheets, Steve
-
- cc: MACAPP$ MacApp Interest List
-
- Sub: Response to Help with…
-
- Steve,
-
- Event handlers are initialized by calling IEvtHandler and passing its "next
- handler." If your DoSetupMenus and DoMenuCommand methods are not being called,
- it is because the event handler is not in the "target chain." At any given
- time, one event handler is considered the "target" for non-location dependent
- events (such as menus and keystrokes). The global variable gTarget maintains
- the target. Since event handlers have a "next handler" they form a linked list
- of event handlers. The list starting with the target is known as the "target
- chain." Generally, at any given time the target is the primary view of the
- active window. By default, the target chain is primary view, its window, its
- document, and finally the application.
-
- If your event handler is not inserted somewhere in that chain, the it will not
- get a crack at any events. So, you'll have to insert it into the list at the
- appropriate places. For example, IDocument initializes a document and sets its
- next handler to the application by calling IEvtHandler(gDocument). After
- calling IDocument, you may wish to insert your event handler between the
- document and the application.
-
- Curt Bianchi
- Apple Computer
-
-